The amount of multimedia data available in electronic format is every increasing. The cost of loading such data into a database is quite high and it is desirable that this task does not have to be repeated when writing different applications which use such data. Furthermore it is desirable to be able to add different databases to a system without the need to rewrite the application in a major way. In general, a relational database comprises tables which contain records that have a zero-to-many relationship to records in other tables. A query is formulated against one or many tables as appropriate and upon execution returns a set of records. To get the desired user query resolved, several sub-queries may have to be formulated, and then the results of each of these sub-queries combined.
For example, assume a DB2 (IBM.TM.) database which is populated with several tables. Each table has many records (rows) and many columns. A user can pose a query like: find all the DEALERS which have PINK CADILLACS in STOCK (referred to as parametric query). In this example, there are at least the following columns in the database: DEALERS, COLOR, MAKE, AVAILABILITY. (This is a straightforward database example). Now lets assume that with each row in the table, there is also a textual description columns. Some databases like DB2 have a special method (called DB2 TextExtenders, IBM.TM.) to search such textual columns for the occurrence of a string or a logical expression of words (e.g. USED or NEW). A multi-search query would for instance extend the above query by adding the query condition "USED or NEW". One way to execute the query is to first execute the parametric query and store its results in an application, then execute the textual query and store its result in the application. The application then combines the results of the two sub-queries (e.g. parametric and textual) for a final result. The problem is that each of the sub-queries may return a big result set, which is expensive to transmit from the database to the application. Furthermore, combining results from the sub-queries is expensive.